package com.tongzhan.controller;

import com.tongzhan.base.Return;
import com.tongzhan.service.MarkPromptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 角标提示
 * @author htmic
 * @date 2020/7/31
 */
@RequestMapping("/markPrompt")
@RestController
public class MarkPromptController {

    @Autowired
    private MarkPromptService markPromptService;

    /**
     * 获取角标提示
     * @return
     */
    @PostMapping("/list")
    public Return list(String userId) {
        if (StringUtils.isEmpty(userId)) {
            return Return.getErrorResult("缺少参数");
        }
        Map<String, Object> result = markPromptService.getList(userId);
        return Return.getSuccessResult(result);
    }
}
